﻿function displayTheObject(theId) {
    var obj = document.getElementById(theId);
    obj.style.display = "block";
}
function blockTheObject(theId) {
    var obj = document.getElementById(theId);
    obj.style.display = "none";
}

function switchDisplaying(theId) {
    var obj = document.getElementById(theId);
    if (obj.style.display == "none") {
        obj.style.display = "block";
    }
    else {
        obj.style.display = "none"
    }
}

function doNothing() {
    return;
}

function selectThis(elementid, elementid2, elementid3, theValue, theValue2, theValue3) {
    document.getElementById(elementid).value = theValue;
    document.getElementById(elementid2).value = theValue2;
    document.getElementById(elementid3).value = theValue3;
}

function disableThis(elementID) {
    alert(elementID);
    document.getElementById(elementID).disabled = "disabled"
}

function selectedTheDepartmentRadio(idValue, xgameradio) {
    var items = document.getElementsByName(xgameradio);

    for (var i = 0; i < items.length; i++) {
        var xvalue = items[i].value;
        if (xvalue == idValue) {
            items[i].checked = "checked";
        }
    }
}

function switchTab(n) {
    for (var i = 1; i <= 4; i++) {
        document.getElementById("tab_" + i).className = "";
        document.getElementById("tab_con_" + i).style.display = "none";
    }
    document.getElementById("tab_" + n).className = "on";
    document.getElementById("tab_con_" + n).style.display = "block";
}

//是否可以检查：必须存在这家单位才能检查
function canMakeCheckUp(mid) {
    if (mid == null || mid == "") {
        alert("对不起，被检查单位不能为空！");
        return false;
    }
    switchTab(3);
}